/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.tspp.dao;

import com.tspp.dao.dto.Exam;
import java.sql.Date;
import java.util.List;

/**
 * Interface for exam dao. Contains crud operation.
 * @author Maks
 */
public interface ExamDao {

    /**
     * Inserts a new row in the EXAM table.
     */
    public void insert(Exam dto) throws DaoException;

    /**
     * Updates a single row in the EXAM table.
     */
    public void update(int exam, Exam dto) throws DaoException;

    /**
     * Deletes a single row in the EXAM table.
     */
    public void delete(int exam) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'ID_EXAM = :idExam'.
     */
    public Exam findByPrimaryKey(int idExam) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria ''.
     */
    public List<Exam> findAll() throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'ID_SPECIALITY = :idSpeciality'.
     */
    public List<Exam> findBySpeciality(int idSpeciality) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'ID_EXAM = :idExam'.
     */
    public List<Exam> findWhereIdExamEquals(int idExam) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'SUBJECT = :subject'.
     */
    public List<Exam> findWhereSubjectEquals(String subject) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'TYPE = :type'.
     */
    public List<Exam> findWhereTypeEquals(String type) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'DATE_TIME = :dateTime'.
     */
    public List<Exam> findWhereDateTimeEquals(Date dateTime) throws DaoException;

    /**
     * Returns all rows from the EXAM table that match the criteria 'ADDRESS = :address'.
     */
    public List<Exam> findWhereAddressEquals(String address) throws DaoException;
}

